//
//  LBShareStartViewController.h
//  share
//
//  Created by 杨庆人 on 17/4/10.
//  Copyright © 2017年 杨庆人. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <UMSocialCore/UMSocialCore.h>
#import "LBShareKeyModel.h"
#import "LBChannelKeyModel.h"
typedef NS_ENUM(NSInteger, LBShareResultCode) {
    LBShareNoHandling = -2,    /** 不做处理，设置的key为空的时候 */
    LBShareFailureCode = -1,    /** 分享失败 */
    LBShareCancelCode = 0,     /** 取消 */
    LBShareSuccessCode = 1      /** 分享成功 */
};

typedef void(^LBShareResultBlock)(LBChannelModel * channelModel,LBShareResultCode shareResultCode);

typedef void(^LBChannelKeyBlock)(LBChannelKeyModel * model);

@interface LBShareViewController : UIViewController



/**
 设置友盟key和渠道的key，在Appdelegate设置
 
 @param shareKeyModel
 */
+ (void)setLBChannelKeyBlock:(LBChannelKeyBlock)shareKeyModel;



/**
 发起分享

 @param shareTitle
 @param shareSubTitle
 @param shareURL
 @param shareImage  分享的图片
 @param shareImage  分享的图片Url
 @param shareResult 分享结果
 */
+ (void)showWithShareTitle:(NSString *)shareTitle
             shareSubTitle:(NSString *)shareSubTitle
                  shareURL:(NSString *)shareURL
                shareImage:(UIImage *)shareImage
             shareImageUrl:(NSString *)shareImageUrl
          shareResultBlock:(LBShareResultBlock)shareResult;



/**
 自定义渠道分享方法

 @param shareTitle
 @param shareSubTitle
 @param shareURL
 @param shareImage 分享的图片
 @param shareImageUrl 分享的图片Url
 @param socialPlatformType 分享渠道(注：仅支持联结已经注册的《微信》、《朋友圈》、《QQ》、《QQ空间》、《新浪微博》)
 @param shareResult 分享结果
 */

+ (void)startShareWithShareTitle:(NSString *)shareTitle
                   shareSubTitle:(NSString *)shareSubTitle
                        shareURL:(NSString *)shareURL
                      shareImage:(UIImage *)shareImage
                   shareImageUrl:(NSString *)shareImageUrl
           currentViewController:(id)currentViewController
              socialPlatformType:(UMSocialPlatformType)socialPlatformType
                shareResultBlock:(LBShareResultBlock)shareResult;


/**
 修改分享渠道

 @param shareKeyBlock
 */
+ (void)modifyUmSocialChannelWithShareKeyModel:(void(^)(LBShareKeyModel * shareKeyModel))shareKeyBlock;
@end



